-
Notifications
You must be signed in to change notification settings - Fork 264
[ENH] Add whole-series ROCKAD anomaly detector #2871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Thank you for contributing to
|
fbe0c72 to
b9c2a5b
Compare
|
As I understand it some tests are failing because the series as well as the collection ROCKAD are named the same? Should we give unique names like ROCKAD_Series and ROCKAD_Collection? However this would not fit in the current naming schema... Or can the tests be updated? |
|
Hi, I fixed this in a separate PR. It may be better to rename one of them either way, i.e. SubsequenceROCKAD or something |
Ok, should we then just rename the whole-series approach to class WholeSeriesRockad()? File name can stay the same (_rockad)? |
|
I will leave it up to you, I have no preference. I assumed the whole series one was the original. |
I’ve thought about this again, and if the test issue has been resolved anyway, I would actually prefer keeping the original class names. This way, the class names across the different ML approaches remain consistent. In my opinion, the abstraction between BaseSeriesAnomalyDetector and BaseCollectionAnomalyDetector is already clear enough. |
|
I am also fine with keeping the names the same. @MatthewMiddlehurst do you prefer separate names, anyway? |
|
sorry, missed the PR, I dont mind if they have the same name either |
TonyBagnall
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couple of structural points, fine otherwise
| def __init__( | ||
| self, | ||
| n_estimators=10, | ||
| n_kernels=100, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given the internal type hints, may as well have type hints on the constructor argument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The types can be inferred from the default value, so they are not strictly necessary. However, for documentational purposes, I would agree.
|
Hi, i reworked how to thread a bit so there was a new failure here. I have fixed this a few small bits myself. |
SebastianSchmidl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MatthewMiddlehurst thanks for taking care of the changes! I think, we should add some tests and comments regarding the power transformer failure. The test should cover a case where the power transformer fails and ROCKAD falls back to no transformation; the test then checks whether the prediction also uses no transformation.
|
I'm not sure the PowerTransform bit is necessary and I can't seem to reproduce it with a test so have removed it for now. Maybe @pattplatt can give some help here if it is necessary. It can be turned off with a parameter in either case for the same functionality as the automatic disabling. Just removed the docs bit for now, they both have the same name so not sure if that will cause issues when linking to each other in a "See Also" section or whatever. |
SebastianSchmidl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with the changes. We can add the fallback path back in later if we really need it.
Reference Issues/PRs
Extends on #2326 and replaces #2795 (rebased and updated to current main)
What does this implement/fix? Explain your changes.
Implements whole-series ROCKAD as semi-supervised anomaly detector
Any other comments?
PR checklist
For all contributions
For new estimators and functions
__maintainer__at the top of relevant files and want to be contacted regarding its maintenance. Unmaintained files may be removed. This is for the full file, and you should not add yourself if you are just making minor changes or do not want to help maintain its contents.For developers with write access